Skip to main content

All Questions

Tagged with
13votes
2answers
3kviews

What was the main implementation programming language of old 16-bit Windows versions (Windows 1 - Windows 3.11)?

It seems that MS-DOS was primarily written in assembly even in its last versions. I understand that new versions of Windows such as the NT-based versions currently in use, and Windows 95 .. ME which ...
juhist's user avatar
  • 1,165
12votes
2answers
1kviews

Is there a pre-defined compiler macro for legacy Microsoft C 5.10 to get the compiler's name and version number?

In Microsoft Visual C++, I can use the macros _MSC_VER for compiler identification and _MSC_FULL_VER for its version number to retrieve the data of the used compiler at runtime of my C program. But ...
Coder's user avatar
  • 1,282
3votes
1answer
757views

What do the pins D0-D7 on the Intel 8080 exactly signify?

I am currently trying to create a FPGA styled simulator of the 8080 in C. I have a couple of questions regarding the D0-D7 pins. As far as I can see the D0-D7 lines are used in order to store data (a ...
cdunku's user avatar
4votes
2answers
2kviews

Gameboy Key Input Causes Crash

I made a Key Tester using the STDIO header included with GBDK. It works... Until it doesn't. All the keys register and print to the screen, except the Left(5) and Right(4) Directional Keys, which ...
OPM eStudio's user avatar
5votes
5answers
951views

Are there any statistics or data showing how much more productive the C programming language is compared to x86 assembly language?

I found out today that a large project like Microsoft Windows 1.0 took 80 man-years to develop. And this one was written in x86 assembly language. Is there a form or rule of thumb that states how much ...
Coder's user avatar
  • 1,282
7votes
2answers
742views

What is the earliest use in C of indexing the bits of a float or double to sample a table lookup?

One common way to produce an approximation of a function like the logarithm or the exponential is to precompute a table of values (a lookup table) for the output or some intermediate stage of the ...
Adam Hyland's user avatar
18votes
3answers
3kviews

When did type punning through violating the strict aliasing rule become disallowed?

Looking at the C code from the Fast Inverse Square Root, the casting of a float to a long is done via pointer arithmetic: i = * ( long * ) &y; // evil floating point bit level hacking The ...
Adam Hyland's user avatar
26votes
12answers
7kviews

Why were nested functions excluded from B and C?

I'm learning C and was curious as to why the language does not allow nested functions. From what I've read, the lack of nested functions seems to have been a simplification that was inherited from its ...
user51462's user avatar
41votes
4answers
7kviews

When was this C function definition style, with type declarations of parameters after the parameter list, invented?

Recently I dug a little bit into old graphics libraries and found libxmi. The site was last updated on 08/09/2000. And in the source code I found the following style of function definitions which I ...
hefe's user avatar
  • 669
60votes
4answers
13kviews

Why were single quotes ('…') chosen for characters, and double quotes ("…") for strings?

In C, '' is used to denote a character, while "" is used to denote a string. Why was this syntax chosen? I tried to research this using Wikipedia’s Timeline of Programming Languages along ...
hb20007's user avatar
32votes
3answers
5kviews

Why is the ‘auto’ storage class specifier included in C?

The auto keyword in C seems quite redundant: wherever it makes sense to define a variable with automatic storage duration, it is already the default, so there is no reason to use the keyword. The ...
user3840170's user avatar
2votes
2answers
289views

Why isn't this invocation of XMS function Move EMB 0Bh in Turbo C correct?

Following on from my last question, I cannot get Move Extended Memory Block (Function 0Bh) working in Turbo C 2.01. The following main.c contains only the minimum functions: get the XMS driver pointer,...
knol's user avatar
  • 12.8k
8votes
2answers
1kviews

How can I malloc() a block that's guaranteed to lie within a single DMA segment in Turbo C 2.01?

I'm following root42's videos about DOS programming using Turbo C 2.01. I've written my own Soundblaster 1.xx driver following the Creative Labs documentation, and I'm confused about memory allocation....
knol's user avatar
  • 12.8k
3votes
1answer
738views

How to read disk files using CBM specific functions in cc65 with proper error checking

TL:DR What is the reason my kernel_read() function ignoring file errors? I'm trying to understand how to work with files in cc65 using CBM specific functions. My target is Commodore 64 with 1541 ...
wizofwor's user avatar
3votes
4answers
1kviews

Was there ever a compiler type that was just large enough to contain a memory segment?

From this answer, Hark back to the days of segmented 16-bit architectures for example: an array might be limited to a single segment (so a 16-bit size_t would do) BUT you could have multiple ...
Evan Carroll's user avatar

153050per page
close